# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSafetyRating do
  @moduledoc """
  Safety rating corresponding to the generated content.

  ## Attributes

  *   `blocked` (*type:* `boolean()`, *default:* `nil`) - Output only. Indicates whether the content was filtered out because of this rating.
  *   `category` (*type:* `String.t`, *default:* `nil`) - Output only. Harm category.
  *   `probability` (*type:* `String.t`, *default:* `nil`) - Output only. Harm probability levels in the content.
  *   `probabilityScore` (*type:* `number()`, *default:* `nil`) - Output only. Harm probability score.
  *   `severity` (*type:* `String.t`, *default:* `nil`) - Output only. Harm severity levels in the content.
  *   `severityScore` (*type:* `number()`, *default:* `nil`) - Output only. Harm severity score.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :blocked => boolean() | nil,
          :category => String.t() | nil,
          :probability => String.t() | nil,
          :probabilityScore => number() | nil,
          :severity => String.t() | nil,
          :severityScore => number() | nil
        }

  field(:blocked)
  field(:category)
  field(:probability)
  field(:probabilityScore)
  field(:severity)
  field(:severityScore)
end

defimpl Poison.Decoder,
  for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSafetyRating do
  def decode(value, options) do
    GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSafetyRating.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.DiscoveryEngine.V1beta.Model.GoogleCloudDiscoveryengineV1alphaSafetyRating do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
